<?php
declare (strict_types=1);

namespace app\exam\logic;

use think\facade\Cache;
use app\common\exception\LogicException;
use app\exam\model\TopicMaterial as TopicMaterialModel;

/**
 * 试题逻辑
 */
class TopicMaterial extends TopicMaterialModel
{

	/**
	 * 获取子题类型
	 * Author 亓官雨树<lucky.max@foxmail.com>
	 * Date 2021-04-25
	 * @param  int    $id [description]
	 * @return [type]     [description]
	 */
	public function getTopicType(int $id)
	{
		$type = $this->whereId($id)->value('question_type');
		return $type*1;
	}

}